From 5bc3923bae211780715714e559b24398f6a385b8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 28 Sep 2021 15:59:24 -0400 Subject: [PATCH] builder-tool: Avoid + toolbar New diff --git a/tools/gtk-builder-tool-simplify.c b/tools/gtk-builder-tool-simplify.c index ff1f72a482..3eb5a21f78 100644 --- a/tools/gtk-builder-tool-simplify.c +++ b/tools/gtk-builder-tool-simplify.c @@ -1723,7 +1723,6 @@ rewrite_toolbar (Element *element, MyParserData *data) { GList *l, *ll; - Element *style = NULL; set_attribute_value (element, "class", "GtkBox"); @@ -1747,9 +1746,6 @@ rewrite_toolbar (Element *element, Element *object = NULL; Element *packing = NULL; - if (g_str_equal (child->element_name, "style")) - style = child; - if (!g_str_equal (child->element_name, "child")) continue; @@ -1794,10 +1790,13 @@ rewrite_toolbar (Element *element, child->children = g_list_remove (child->children, packing); } - if (!style) - style = add_element (element, "style"); + { + Element *child; - set_attribute_value (add_element (style, "class"), "name", "toolbar"); + child = add_element (element, "property"); + set_attribute_value (child, "name", "css-classes"); + child->data = g_strdup ("toolbar"); + } } static void -- 2.30.2